<?php
class Entrada extends Zend_Db_Table {
	
	protected $_name = 'entradas';
	
	public function getNextId(){  
        $select = $this->select();
		$select->from($this, 'nextval(\'seq_entrada\') as nextid ,max(id) as lastid');
		$x = $this->fetchRow($select)->toArray();
		return $x["nextid"];
    }
}
?>